home *** CD-ROM | disk | FTP | other *** search
- Path: inforamp.net!ts31-02
- From: rmorin@inforamp.net (Randy Charles Morin)
- Newsgroups: comp.lang.c++
- Subject: Re: Major problem with strings.
- Date: Mon, 11 Mar 96 06:20:01 GMT
- Organization: MiddleWorld SoftWare
- Message-ID: <4i0gn0$5g9@sam.inforamp.net>
- References: <31438275.72DB@aol2.com>
- NNTP-Posting-Host: ts31-02.tor.inforamp.net
- X-Newsreader: News Xpress Version 1.0 Beta #4
-
- In article <31438275.72DB@aol2.com>, Neil <neil@aol2.com> wrote:
- >1 char *club="";
- >2 club="/public_html/neil";
- >3 strcat(club,argv[1]+5);
- >4 strcat(club,"/");
-
- No, this just won't do. When you want a '/' slash in C, use two slashes. The
- '/' is also used to denote an escape sequence (for special characters). Thus
- your code should read...
-
- 1 char *club="";
- 2 club="//public_html//neil";
- 3 strcat(club,argv[1]+5);
- 4 strcat(club,"//");
-
- Agrivar
-